import { createRouter, createWebHistory } from 'vue-router' 
import Home from '../views/home.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home, 
      meta:{
        title:"首页"
      },
      // redirect:"/models"
    },
    { 
      path: '/baseGlobal',
      name: 'baseGlobal',  
      meta:{
        title:"基础地球"
      },
      component: () => import('../views/baseGlobal.vue')
    },

    { 
      path: '/zuobiao',
      name: 'zuobiao',  
      meta:{
        title:"坐标转化"
      },
      component: () => import('../views/zuobiao.vue')
    },
    { 
      path: '/models',
      name: 'models',  
      meta:{
        title:"添加模型"
      },
      component: () => import('../views/model.vue')
    },
    { 
      path: '/billboard',
      name: 'billboard',  
      meta:{
        title:"绘制广告牌"
      },
      component: () => import('../views/billboard.vue')
    }, 
    { 
      path: '/polyline',
      name: 'polyline',  
      meta:{
        title:"(polylineCollection)绘制线段"
      },
      component: () => import('../views/polyline.vue')
    },  
    { 
      path: '/polylineGeometry',
      name: 'polylineGeometry',  
      meta:{
        title:"(geometryInstances)绘制线段"
      },
      component: () => import('../views/polylineGeometry.vue')
    },
    { 
      path: '/cameraFollow',
      name: 'cameraFollow',  
      meta:{
        title:"相机跟随实体且实体朝向路线"
      },
      component: () => import('../views/cameraFollow.vue')
    }, 
    { 
      path: '/texture',
      name: 'texture',  
      meta:{
        title:"纹理"
      },
      component: () => import('../views/texture.vue')
    },  
    { 
      path: '/about',
      name: 'about', 
      meta:{
        title:"关于我们"
      },
      component: () => import('../views/AboutView.vue')
    },
  ]
})

export default router
